import { PORT1 } from "../config/servicePort";
import Http from "@/api/index";

const baseUrl = PORT1 + "/system/loupan/active";

export const createGroup = (params: any) => {
  return Http.post(baseUrl + "/group/add", params);
};

export const editGroup = (params: any) => {
  return Http.put(baseUrl + "/group/edit", params);
};

export const getGroups = () => {
  return Http.get(baseUrl + "/group/list");
};

export const createActive = (params: any) => {
  return Http.post(baseUrl + "/add", params);
};

export const editActive = (params: any) => {
  return Http.put(baseUrl + "/edit", params);
};

export const getList = (params: any) => {
  return Http.post(baseUrl + "/list", params);
};

export const getActive = (id: number) => {
  return Http.get(baseUrl + "/detail", { id });
};

export const deleteActive = (params: any) => {
  return Http.post(baseUrl + "/delete", params);
};
